package com.sunmnet.j2ee.service.powerdb.designer;

import com.sunmnet.j2ee.entity.powerdb.designer.PdmModule;
import com.sunmnet.j2ee.service.BaseService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 蔡岳衡 on 2016/8/4.
 */
public interface ModuleService extends BaseService<PdmModule, Long> {

	int checkRepeat(PdmModule module);

	PdmModule get(Long id, Long versionId);

	List getModuleById(long moduleId) throws Exception;

	List getProjectRelModule(long projectId) throws Exception;

	List getModuleRelEntity(long moduleId) throws Exception;

	PdmModule copyModules(PdmModule module, long versionId) throws Exception;

	/**
	 * 删除模块时，级联删除模块所有关系
	 *
	 * @param moduleId
	 * @throws Exception
	 */
	void deleteModuleRelations(long moduleId) throws Exception;
}
